<?php

namespace common\models;

/**
 * This is the ActiveQuery class for [[MktPost]].
 *
 * @see MktPost
 */
class MktPostQuery extends \yii\db\ActiveQuery
{
    /*public function active()
    {
        $this->andWhere('[[status]]=1');
        return $this;
    }*/

    /**
     * @inheritdoc
     * @return MktPost[]|array
     */
    public function all($db = null)
    {
        return parent::all($db);
    }

    /**
     * @inheritdoc
     * @return MktPost|array|null
     */
    public function one($db = null)
    {
        return parent::one($db);
    }

    public function today()
    {
        $this->andWhere(['>=', 'create_time', date("Y-m-d", strtotime('today midnight'))]);        
        return $this;
    }
    
}
